var name,message,color;

function get(){
	pi.get("container").innerHTML = [
		name.environment.getValue(),
		message.environment.getValue(),
		color.environment.getValue(),
	].join("<br />");
};

pi.util.Init.push(function(){
	name = new pi.element("input").insertAfter(
		new pi.element("label").update("Name:").insert(pi.get("form"))
	);
	
	new pi.element("BR").insertAfter(name);
	
	message = new pi.element("textarea").insertAfter(
		new pi.element("label").update("Message:").insert(pi.get("form"))
	);
	
	new pi.element("BR").insertAfter(message);
	
	color = new pi.element("select").child.add(
		new pi.element("option").attribute.set("value","RED").update("Red"),
		new pi.element("option").attribute.set("value","Green").update("Green"),
		new pi.element("option").attribute.set("value","Blue").update("Blue")
	).insertAfter(
		new pi.element("label").update("Color:").insert(pi.get("form"))
	);
	
	new pi.element("BR").insertBefore(
		new pi.element("button").event.addListener("click",get).update("Get Values").insertAfter(color)
	);
});